package TestBuffered;

import java.io.*;

public class TestBufferedReader {
    public static void main(String[] args) throws IOException {
        BufferedReader bf=null;
        try {
            String path="F:\\123.txt";
            Reader reader=new FileReader(path);
            bf=new BufferedReader(reader);

            char[] chars=new char[7];
            int count;
            while ((count= reader.read(chars)) != -1){
                String str=new String(chars,0,count);
                System.out.println(str);
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if (bf!=null) bf.close();
        }
    }
}
